Feat/ai-groq-summarize#837
Conversation
- Added `groqSummarize` and `createGroqSummarize` functions for summarization capabilities. - Updated `package.json` to use `tsx` for running the documentation verification script. - Enhanced documentation for the Groq adapter to include summarization examples and usage. - Updated tests to validate the new summarization functionality and ensure proper integration with existing features. - Modified configuration files to reflect the addition of summarization support. This commit enhances the Groq integration by providing tree-shakeable summarization adapters, aligning with patterns used by other providers.
Replaced the command for the documentation verification script in package.json from `node` to `tsx` for improved execution. This change aligns with recent updates to enhance script performance and compatibility.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds Groq summarize factories and exports, wires Groq into summarize tests and e2e routing, and updates docs, navigation metadata, and release notes. ChangesGroq summarize support
Estimated code review effort: 3 (Moderate) | ~30 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant ApiSummarizeRoute
participant CreateSummarizeAdapter
participant createGroqSummarize
participant GroqTextAdapter
ApiSummarizeRoute->>CreateSummarizeAdapter: select groq factory
CreateSummarizeAdapter->>createGroqSummarize: model, apiKey, baseURL, headers
createGroqSummarize->>GroqTextAdapter: create summarize adapter
GroqTextAdapter-->>CreateSummarizeAdapter: ChatStreamSummarizeAdapter
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/config.json`:
- Around line 443-444: The Groq entry’s metadata is stale: update the updatedAt
value in docs/config.json for the affected entry from the older date to the
current docs change date. Use the existing entry fields around addedAt/updatedAt
to locate the record, and keep the updatedAt timestamp aligned with the content
change while leaving the rest of the metadata unchanged.
In `@testing/e2e/src/routes/api.summarize.ts`:
- Around line 50-54: The Groq e2e setup is overriding the adapter’s default
endpoint and missing the required /openai/v1 path, so requests are going to the
wrong route. Update the groq configuration in api.summarize.ts so
createGroqSummarize still uses llmockBase(aimockPort) but with the Groq-specific
/openai/v1 suffix, ensuring the adapter targets /openai/v1/chat/completions
instead of the root /chat/completions path.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 93c8d147-485d-41d5-806c-278babe3ce70
📒 Files selected for processing (11)
.changeset/groq-summarize-adapter.mddocs/adapters/groq.mddocs/config.jsonpackage.jsonpackages/ai-groq/README.mdpackages/ai-groq/src/adapters/summarize.tspackages/ai-groq/src/index.tspackages/ai-groq/tests/groq-adapter.test.tspackages/ai/tests/summarize-max-length.test.tstesting/e2e/src/lib/feature-support.tstesting/e2e/src/routes/api.summarize.ts
|
Updated this PR with the review feedback, merged the latest main, resolved conflicts, and verified everything with pnpm run test:pr. Ready for another look. Thanks! |
Replaced the command for the documentation verification script in package.json from
nodetotsxfor improved execution. This change aligns with recent updates to enhance script performance and compatibility.🎯 Changes
✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit
groqSummarize,createGroqSummarize) for@tanstack/ai, including README and adapter documentation updates./api/summarize.maxLengthhandling to use Groq’s native token limit option.tsx.